package es.sag.deck;

import java.util.Iterator;

import es.sag.deck.system.SysSiStebbins;

public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    Deck ssDeck = new Deck(new SysSiStebbins());
    
    System.out.println(ssDeck.getRandomCard());
    System.out.println(ssDeck.getRandomCard());
    System.out.println(ssDeck.getRandomCard());
    System.out.println(ssDeck.getRandomCard());
    System.out.println(ssDeck.getRandomCard());
    
    ssDeck.shuffle();
    
    int cut = ssDeck.cut();
    System.out.println("CUT "+cut);
//    for (int i=1; i<=52; i++) {
//      System.out.println(ssDeck.getPosition(ssDeck.getCard(i)) + " --> " + ssDeck.getCard(i));
//    }
    Iterator<Card> fwIt = ssDeck.fwIterator();
    while (fwIt.hasNext()) {
      Card c = fwIt.next();
      System.out.println(ssDeck.getPosition(c) + " --> " + c);
    }
    
    System.out.println();
    
    Iterator<Card> bwIt = ssDeck.bwIterator();
    while (bwIt.hasNext()) {
      Card c = bwIt.next();
      System.out.println(ssDeck.getPosition(c) + " --> " + c);
    }
    
    ssDeck.restartOrder();
  }

}
